﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using MWControlSuite;
using System.Windows.Forms;

namespace DocToolTipLib.Controls
{
  public class FacadeTreeView : MWControlSuite.MWTreeView
  {
    public bool CanRaiseAfterCheckEvent;
    public ArrayList SelectedNodes
    {
      get
      {
        ArrayList result = new ArrayList();
        foreach (MWTreeNodeWrapper mwtnw in this.SelNodes.Values)
        {
          result.Add(mwtnw.Node);
        }

        return result;
      }
    }

    public bool IsSelected(TreeNode node)
    {
      bool bIsSelected = this.SelNodes.ContainsKey(node.GetHashCode());
      return bIsSelected;
      
    }

    public void Clear()
    {
      this.Nodes.Clear();
      this.SelNodes.Clear();
      Refresh();
    }
  }
}
